home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1996 #15
/
Monster Media Number 15 (Monster Media)(July 1996).ISO
/
prog_gen
/
t4diblib.zip
/
ANIMATE5.F4_
/
ANIMATE5.F4
Wrap
Text File
|
1995-12-11
|
4KB
|
141 lines
VERSION 4.00
Begin VB.Form Form1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "ANIMATE5"
ClientHeight = 1680
ClientLeft = 1200
ClientTop = 1572
ClientWidth = 2880
BeginProperty Font
name = "MS Sans Serif"
charset = 1
weight = 700
size = 7.8
underline = 0 'False
italic = 0 'False
strikethrough = 0 'False
EndProperty
ForeColor = &H80000008&
Height = 2100
Left = 1152
LinkTopic = "Form1"
ScaleHeight = 1680
ScaleWidth = 2880
Top = 1200
Width = 2976
Begin VBX.T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 4
Left = 1680
Top = 960
Visible = 0 'False
Width = 972
End
Begin VBX.T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 3
Left = 1560
Top = 840
Visible = 0 'False
Width = 972
End
Begin VBX.T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 2
Left = 1440
Top = 720
Visible = 0 'False
Width = 972
End
Begin VBX.T4DILIB dilib1
Caption = "dilib1"
ControlMode = 0 'Lib -> PIC
Height = 372
Index = 1
Left = 1320
Top = 600
Visible = 0 'False
Width = 972
End
Begin VB.CommandButton Command1
Appearance = 0 'Flat
BackColor = &H80000005&
Caption = "&Quit"
Height = 372
Left = 120
TabIndex = 0
Top = 1200
Width = 1452
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private Declare Function GlobalFree% Lib "kernel" (ByVal h%)
Private Declare Function GetFreeSpace& Lib "kernel" (ByVal x%)
Dim TimeIn!
Dim Frames%
Private Sub Command1_Click()
Terminate
End Sub
Private Sub Form_Load()
Dim loopctr%, memctr%, framectr%
Top = (Screen.Height - Height) / 2!
Left = (Screen.Width - Width) / 2!
'dilib(1) has the 'real' hLib
dilib1(1).LibraryName = "bluespin.ilb"
dilib1(1).Action = IM_ACTION_OPENLIBRARY
Show
Frames = 0
TimeIn = Timer
For memctr = 1 To 4
If memctr > 1 Then
'Clone the hLib into dilibs 2-4.
dilib1(memctr).hLib = dilib1(1).hLib
End If
'One image per dilib1.
dilib1(memctr).MemberNumber = memctr
dilib1(memctr).Action = IM_ACTION_GETMEMBER
Next
For loopctr = 1 To 100
For memctr = 1 To 4
'Disregard comments for tutorial.
'Moving image
'image1.Left = image1.Left + screen.TwipsPerPixelX
'image1.Top = image1.Top + screen.TwipsPerPixelY
'image1.Picture = dilib1(memctr).Picture
'image1.Refresh
Picture = dilib1(memctr).Picture
Frames = Frames + 1
Next memctr
DoEvents
Next loopctr
Terminate
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub Terminate()
Dim TimeOut!, TimeElapsed!, fps!
TimeOut = Timer
TimeElapsed = TimeOut - TimeIn
fps = Frames
fps = Frames / TimeElapsed
MsgBox Trim$(Str$(fps)) + " frames per second."
End
End Sub